
# Win32WindowTool Makefile
# 使用MinGW编译

CC = g++
WINDRES = windres
CFLAGS = -mwindows -std=c++17 -Wall -Wextra
LDFLAGS = -mwindows -lshell32

SOURCES = main.cpp
RESOURCES = Win32WindowTool.res

TARGET = Win32WindowTool.exe

all: $(TARGET)

$(TARGET): $(SOURCES) $(RESOURCES)
	$(CC) $(CFLAGS) $(SOURCES) $(RESOURCES) -o $(TARGET) $(LDFLAGS)

Win32WindowTool.res: Win32WindowTool.rc resource.h
	$(WINDRES) Win32WindowTool.rc -O coff -o Win32WindowTool.res

clean:
	del /f /q $(TARGET) Win32WindowTool.res 2>nul || rm -f $(TARGET) Win32WindowTool.res

run: $(TARGET)
	./$(TARGET)
